<?php

/*
=====================================================
 FluxBB - Delux Board Converstations (DBC)
-----------------------------------------------------
 http://dbc-forum.com/
 http://fluxbb.org/
-----------------------------------------------------
 Copyright (c) 2010,2011 FluxBB - Delux Board Conversations (DBC)
-----------------------------------------------------
 Предсловие: Данный скрипт (DBC) не является работой с нуля, то 
 есть ядром скрипта всё также остаётся FuxBB,но теперь в оболочке
 DBC.
=====================================================
*/

// Make sure no one attempts to run this script "directly"
if (!defined('DBC'))
    exit;

if ($cur_post['poster_id']!=1 && $DBC_user['g_rep_enable'] == 1 && $DBC_config['o_reputation_enabled'] == 1 
	&& $cur_post['reputation_enable'] == 1 && $DBC_user['reputation_enable_adm'] == 1 && $DBC_user['reputation_enable'] == 1) 
{ ?>
          				<?php  
            echo '<span class="ft_repa">'. $lang_reputation['Reputation'] . ':</span>'; 
            ?>  <?php 
            //If viewer are guest or user who post this message,then we do not show control buttons
            if($DBC_user['is_guest'] != true && $DBC_user['username'] != $cur_post['username']) { 
            	$repdata='&pid=' .$cur_post['id'] . '&uid=' .$cur_post['poster_id'] .'&method=';
            	$repdataplus=$repdata .'1'; 
            	$repdataminus=$repdata .'2';       				 
            ?><span class="fc_repa"><a href="reputation.php?<?php echo $repdataplus; ?>"><img src="templates/Default/images/warn_add.gif" alt="+" border="0"></a>&nbsp;&nbsp;<a href="reputation_uid<?php echo $cur_post['poster_id'] ?>"><?php echo $cur_post['count_rep_plus']-$cur_post['count_rep_minus']; ?></a>&nbsp;&nbsp;<a href="reputation.php?<?php echo $repdataminus; ?>"><img src="templates/Default/images/warn_minus.gif" alt="-" border="0"></a></span><?php 
            }  
            else 
            {
            	?> &nbsp;&nbsp;<a href="reputation_uid<?php echo $cur_post['poster_id'] ?>"><?php echo $cur_post['count_rep_plus']-$cur_post['count_rep_minus']; ?></a>&nbsp;<?php 
            }
            ?><?php echo "\n";
} 
?>